<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * 模块:后台模块
 * 开发:胡耆英
 * 创建日期: 2011-05-15
 * 
 */
class Admin extends B_Controller
{
    public function __construct()
    {
        parent::__construct();
		parent::check_login();
    }
    
    public function index()
    {
		$this->load->view('index');
    }
	/*
	*加载头部
	*/
	public function head()
	{
		$this->load->library('lunar');
		$now   =  date("Y")."年".date("n")."月".date("d")."日";   
		$day   =  date("d");   
		$week  =  date("w");   
		switch (date("D")) {   
			case   "Mon":   
			$week=   "星期一";   
			break;   
			case   "Tue":   
			$week=   "星期二";   
			break;   
			case   "Wed":   
			$week=   "星期三";   
			break;   
			case   "Thu":   
			$week=   "星期四";   
			break;   
			case   "Fri":   
			$week=   "星期五";   
			break;   
			default:   
			$week=   "星期日";   
			break;   
		}   
		$ld = $this->lunar->calendar(date("Y"),date("m"),date("d"));   
		$nl = $this->lunar->display();   
		$data = array(
			'title' => '广州市巴古服饰有限公司OA系统管理中心.',
			'username'=>$this->session->userdata('username'),
			'date'=>'今天是 阳历:'.$now.'  阴历:'."$nl".''.$week,
		);
		$this->load->view('header',$data);
	}
	
	/*
	*加载左边框
	*/
	public function left()
	{
		$this->load->view('left_menu');
	}
	
	/*
	*加载main
	*/
	public function main()
	{
		$this->load->view('main');
	}
}
?>
